﻿$.namespace('iRealtor.Maps').MapContentService = (function () {
	var mapContentService = {};

	mapContentService.GetPopupContent = function (element, sliderId) {
		var html = '<div style="width:350px;">';

		//add title
		html += '<div style="width:100%; margin-bottom:5px; font-size:14px">' + element.PlaceViews[0].Place.Name + '</div>';
		html += '<div style="width:100%; font-size:12px">' + element.PlaceViews[0].Place.Description + '</div>';
		html += '<hr>';

		html += '<div id="' + sliderId + '" class="tinycarousel"><a class="buttons prev" href="#">left</a><div class="viewport"><ul class="overview">';

		$.each(element.PlaceViews[0].PlaceImages, function (i, e) {
			html += ' <li><a  class="' + sliderId + '" href="' + e.Path + '"><img src="' + e.Path + '"></a></li>';
		});

		html += '</ul></div><a class="buttons next" href="#">right</a></div>';

		html += '<hr>';

		html += '</div>';

		return html;
	};

	return mapContentService;
})();


